
#include "WindowCreator.h"
#include "screen.h"
#include "singleton.h"


WMScreen::WMScreen(int id, Display *d){
	int w, h;
        m_id = id;
        p_display = d;
	p_xscreen = XScreenOfDisplay(p_display, m_id);
        p_monitors = new WMMonitor[10];

	w = XWidthOfScreen(p_xscreen);
	h = XHeightOfScreen(p_xscreen);

	m_size.setX(w);
	m_size.setY(h);

        p_current_monitor = p_monitors;
	// Create a root window from which all the new processes will be children
	p_rootWindow = WindowCreator::getInstance()->create(XRootWindow(p_display, m_id), this, NULL);
}


WMScreen::~WMScreen(){
	delete(p_rootWindow);
}
